package com.gourd.common.annotation;

import com.gourd.common.constant.CommonConstant;
import java.lang.annotation.*;

/**
 * @program: springboot
 * @description: 动态切换数据源注解
 * @author: gourd
 * @date: 2018-11-22 14:02
 * @since: 1.0
 **/
@Documented
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface TargetDataSource {
    String value() default CommonConstant.MASTER_DATASOURCE;
//    //代码切换到数据源
//    DynamicDataSource.setDataSource(CommonConstant.MASTER_DATASOURCE);
//    DynamicDataSource.clearDataSource();
}
